// ConVar

CreateConVar("ss_enable", "1", FCVAR_NOTIFY)

if (GetConVarNumber("ss_enable") == 1) then
	// Serverside

	include("ServerSecureServer/AutoRun.lua")

	// Clientside

	AddCSLuaFile("client/ServerSecure.lua")
	
	// Files
	
	local function AddCSLuaFolder(Folder)
		local Files = file.FindInLua(Folder.."*")
		
		if (Files) then
			for K, V in pairs(Files) do
				if (V != "." and V != "..") then
					if (file.IsDir("../lua/"..Folder..V.."/")) then
						AddCSLuaFolder(Folder..V.."/")
					else
						local Explode = string.Explode(".", V)
						
						local Number = table.getn(Explode)
						
						local Extension = Explode[Number]
						
						if (Extension == "lua") then
							AddCSLuaFile(Folder..V)
						end
					end
				end
			end
		end
	end
	
	AddCSLuaFolder("ServerSecureClient/")
end